@extends('layouts.default') @section('main')
    <link rel="stylesheet" href="/css/uniform.css" />
    <link rel="stylesheet" href="/css/select2.css" />
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb"> <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> <a href="#" class="current">用户管理</a> </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">

                    <form action="{{url('useraction/search')}}" method="post">
                        <table>
                            <tr>
                                <th>
                                    <label >昵称 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="nickname" value="" placeholder="昵称" />
                                    </div>
                                </th>
                                <th>
                                    <label >用户名 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="username" value="" placeholder="用户名" />
                                    </div>
                                </th>
                                <th>
                                    <label >姓名 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="realname" value="" placeholder="姓名" />
                                    </div>
                                </th>

                                <th>
                                    <label >角色 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <select  name="role" class="span11" >
                                            <option value="">请选择</option>
                                            <option value="2">项目方</option>
                                            <option value="3">投资人</option>
                                            <option value="4">创客空间</option>

                                        </select>
                                    </div>
                                </th>
                                <th>
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <div class="controls">
                                        <button type="submit" class="btn btn-info">查询</button>
                                    </div>
                                </th>
                            </tr>
                        </table>
                    </form>

                    <div class="widget-box">
                        <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                            <h5>会员管理</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>昵称</th>
                                    <th>真实名称</th>
                                    <th>用户名</th>
                                    <th>角色名</th>
                                    <th>发布的项目</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($users as $key => $user)
                                    <tr class="gradeX">
                                        <td>{{$user->nickname}}</td>
                                        <td>{{$user->realname}}</td>
                                        <td>{{$user->username}}</td>
                                        <td>@if($user->roleUser){{$user->roleUser->role->name}}@endif</td>
                                        <td>@if(count($user->projects)) <a href="{{ url('useraction/projects?uid='.$user->uid) }}">点击查看</a> @else 还未发布 @endif </td>
                                        <td class="center">
                                            @if(in_array('edit',$actions))<a data-original-title="编辑" class="tip" href="{{url('user/edit?uid='.$user->uid)}}"><i class="icon-pencil"></i></a>@endif
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <?php echo $users->render();?>
                </div>
            </div>
        </div>
    </div>
    <script src="/js/jquery.min.js"></script>
    <script src="/js/matrix.tables.js"></script>
@stop
